package com.ztgf.shopping.service.template;

import com.qiyuesuo.sdk.v2.SdkClient;
import com.qiyuesuo.sdk.v2.exception.ServiceException;
import com.qiyuesuo.sdk.v2.http.HttpConnection;
import com.qiyuesuo.sdk.v2.http.HttpHeader;
import com.qiyuesuo.sdk.v2.http.HttpMethod;
import com.qiyuesuo.sdk.v2.http.HttpParameter;
import com.qiyuesuo.sdk.v2.request.SdkRequest;
import com.qiyuesuo.sdk.v2.utils.MD5;
import com.qiyuesuo.sdk.v2.utils.StringUtils;
import com.ztgf.shopping.models.constant.ShoppingConstant;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.shopping.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.shopping.mapper.template.ContractSignatureMapper;
import com.ztgf.shopping.models.service.template.IContractSignatureService;
import com.ztgf.shopping.models.bo.template.ContractSignatureSaveBO;
import com.ztgf.shopping.models.dto.template.ContractSignatureDTO;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.UUID;

/**
 * 合同电子签章控制器
 *
 * @author YUE
 * @Date 2020-05-28 16:02:15
 */
@DubboService
public class ContractSignatureServiceImpl extends ServiceImpl<ContractSignatureMapper, ContractSignatureDTO> implements IContractSignatureService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(ContractSignatureSaveBO saveBO) {
        ContractSignatureDTO dto = new ContractSignatureDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
